createAccount
Create a unsigned transaction to active an account.
Usage
const transaction = await tronWeb.transactionBuilder.createAccount(address, options);
Parameters
Argument | Description | Type |
---|---|---|
address | Account address to be activated in hex format(hexstring or base58) | string |
options | Optional. The permission id for multi-signature and block header for contract block header info. | { permissionId: number, blockHeader: ... } |
Returns
Object - Transaction created to activate an account.
Example
const transaction = await tronWeb.transactionBuilder.createAccount('TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g');
const signedTransaction = await tronWeb.trx.sign(transaction);
const result = await tronWeb.trx.sendRawTransaction(signedTransaction);